package com.minimalist.common.entity.lindi.vo.contracttemplatefieldoption;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.config.mybatis.bo.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * 林地指标平台_合同模板字段选项查询VO
 *
 * @author 11987
 * @since 2025-05-31
 */

@Schema(name = "林地指标平台_合同模板字段选项查询实体")
public class LindiContractTemplateFieldOptionQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "contractTemplateFieldId", description = "合同模板配置字段ID", type = "string")
    private Long contractTemplateFieldId;

    @Schema(name = "optionLabel", description = "选项标签", type = "string")
    private String optionLabel;

    @Schema(name = "optionValue", description = "选项值", type = "string")
    private String optionValue;

    public LindiContractTemplateFieldOptionQueryVO(){
    }

    public Long getContractTemplateFieldId(){
        return contractTemplateFieldId;
    }

    public void setContractTemplateFieldId(Long contractTemplateFieldId){
        this.contractTemplateFieldId = contractTemplateFieldId;
    }

    public String getOptionLabel(){
        return optionLabel;
    }

    public void setOptionLabel(String optionLabel){
        this.optionLabel = optionLabel;
    }

    public String getOptionValue(){
        return optionValue;
    }

    public void setOptionValue(String optionValue){
        this.optionValue = optionValue;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        if (!super.equals(o)){
            return false;
        }
        LindiContractTemplateFieldOptionQueryVO that = (LindiContractTemplateFieldOptionQueryVO) o;
        return Objects.equals(contractTemplateFieldId, that.contractTemplateFieldId) && Objects.equals(optionLabel, that.optionLabel) && Objects.equals(optionValue, that.optionValue);
    }

    @Override
    public int hashCode(){
        return Objects.hash(super.hashCode(), contractTemplateFieldId, optionLabel, optionValue);
    }
}
